import { onBeforeMount, getCurrentInstance } from "vue";
import { useRouter } from 'vue-router';
export default function() {
    const router = useRouter();
    const cookies = getCurrentInstance().appContext.config.globalProperties.$cookies;
    onBeforeMount(() => {
        if (cookies.get('isLogin') === 'false' || !cookies.get('Authorization')) {
            router.push({ name: 'Login' })
        }
    })
}